<h1>+ Add Categories</h1>

<div class = "page">
  
</div>

<div class = "clear"></div>

<form method="post" action="<?php echo base_url(); ?>admin/categories/add/process" class = "form" enctype="multipart/form-data">
  <div class = "field">
    <label>Parent</label>
    <select name="parent" class = "input size1">
      <option value="0">-</option>
      <?php foreach ($parent_list as $v) { ?>
      <option value="<?php echo $v->id; ?>"><?php echo $v->name_th; ?></option>
      <?php } ?>
    </select>
  </div>
  <div class = "field"><label>Name (th)</label><input type = "text" name = "name_th" class = "input size2" ></div>
  <div class = "field"><label>Name (en)</label><input type = "text" name = "name_en" class = "input size2" ></div>
  <div class = "field"><label>Icon</label><input type = "file" name = "img" class = "input size1" > * 25x25 pixel
  <hr>
  <div class = "field"><label></label><input type = "submit" value = "Add" class = "btn">&nbsp;<a href = "#" class = "btn" onclick="javascript:history.back(1)">Cancel</a></div>
    <div class = "field error_msg"><label></label><?php echo $message; ?></div>
</form>

</div>

<style>
  .form label {
    width:80px;
  }
</style>
<script>
  $(document).ready(function(){
    
  });
</script>